const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  
  // 开发服务器配置：统一端口并配置代理以避免跨域
  devServer: {
    port: 8080,
    proxy: {
      '/api': {
        target: 'http://120.48.15.103:5058',
        changeOrigin: true,
        ws: false,
        pathRewrite: { '^/api': '' }
      }
    }
  },
  
  
  chainWebpack: (config) => {
    config.plugin('define').tap((definitions) => {
      Object.assign(definitions[0], {
        __VUE_OPTIONS_API__: 'true',
        __VUE_PROD_DEVTOOLS__: 'false',
        __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false'
      })
      return definitions
    })
  },
  lintOnSave: false,
  publicPath: './'
})


  